package com;

import com.by.config.SpringConfig;
import com.by.eneity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

/**
 * @author LittleDesire
 * @description
 * @date 2022-03-21 周一 10:33
 * @since 17
 */
public class App {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
        ctx.register(SpringConfig.class);
        ctx.refresh();

        for (String beanDefinitionName : ctx.getBeanDefinitionNames()) {

            System.out.println(beanDefinitionName);
        }


        User u = ctx.getBean(User.class);
        System.out.println(u);

    }
}
